
package demo02;

//测试类
public class PersonTest {
    public static void main(String[] args) {
        //需求: 测试乒乓球
        //测试乒乓球教练
        //空参
        PingPangCoach pingPangCoach = new PingPangCoach();
        pingPangCoach.setName("刘国梁");
        pingPangCoach.setAge(46);
        pingPangCoach.eat();
        pingPangCoach.teach();
        pingPangCoach.speakEnglish();
        //全参
        PingPangCoach ppc = new PingPangCoach("刘国梁", 43);
        ppc.eat();
        ppc.teach();
        ppc.speakEnglish();

        System.out.println("-------------------------");

        //测试乒乓球运动员
        //空参
        PingPangPlayer pingPangPlayer = new PingPangPlayer();
        pingPangPlayer.setName("许昕");
        pingPangPlayer.setAge(15);
        pingPangPlayer.eat();
        pingPangPlayer.study();
        pingPangPlayer.speakEnglish();
        //拳擦
        PingPangPlayer ppp = new PingPangPlayer("许昕", 30);
        ppp.eat();
        ppp.study();
        ppp.speakEnglish();

        System.out.println("-------------------------");

        //测试篮球.教练
        //空参
        BasketballCoach basketballCoach = new BasketballCoach();
        basketballCoach.setName("tony");
        basketballCoach.setAge(45);
        basketballCoach.eat();
        basketballCoach.teach();
        //全参
        BasketballCoach basketballCoach1 = new BasketballCoach("jack", 66);
        basketballCoach1.eat();
        basketballCoach1.teach();

        System.out.println("-------------------------");

        //测试篮球.运动员
        //空参
        BasketballPlayer basketballPlayer = new BasketballPlayer();
        basketballPlayer.setName("c-jack");
        basketballPlayer.setAge(45);
        basketballPlayer.eat();
        basketballPlayer.study();
        //拳擦
        BasketballPlayer basketballPlayer1 = new BasketballPlayer("jack", 45);
        basketballPlayer1.eat();
        basketballPlayer1.study();
    }
}
